package br.com.evl.tecinfo.gui;

/**
 *
 * @author alysson
 */
public class TelaLogin2 extends javax.swing.JFrame {

    public static TelaCadastroArea telaArea;
    public static TelaCadrastroCargo telaCargo;
    public static TelaCadastroUsuario telaUsuario;
    public static TelaCadastroFormaPagamento telaPagamento;
    public static TelaCadastroFuncionario telaFuncionario;
    public static TelaRegistroHoraExtra telaHoraExtra;
    public static TelaGeral telaGeral;

    public TelaLogin2() {

        initComponents();
        
        setSize(600, 600);
        telaArea = new TelaCadastroArea();
        telaCargo = new TelaCadrastroCargo();
        telaPagamento = new TelaCadastroFormaPagamento();
        telaFuncionario = new TelaCadastroFuncionario();
        telaUsuario = new TelaCadastroUsuario();
        telaHoraExtra = new TelaRegistroHoraExtra();
        telaGeral = new TelaGeral();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jlblNovo = new javax.swing.JLabel();
        jTLogin = new javax.swing.JTextField();
        jTsenha = new javax.swing.JTextField();
        jB_ir = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();
        lb_imgLogin = new javax.swing.JLabel();
        lb_imgbackground = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Entrar");
        setMinimumSize(new java.awt.Dimension(600, 600));
        setResizable(false);
        getContentPane().setLayout(null);

        jlblNovo.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jlblNovo.setText("Novo Usuário");
        jlblNovo.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jlblNovo.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jlblNovoMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jlblNovoMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                jlblNovoMouseExited(evt);
            }
        });
        getContentPane().add(jlblNovo);
        jlblNovo.setBounds(210, 430, 120, 15);

        jTLogin.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jTLogin.setText("Login");
        jTLogin.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
        jTLogin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTLoginActionPerformed(evt);
            }
        });
        jTLogin.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTLoginKeyReleased(evt);
            }
        });
        getContentPane().add(jTLogin);
        jTLogin.setBounds(210, 350, 212, 30);

        jTsenha.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jTsenha.setText("Senha");
        jTsenha.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
        jTsenha.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTsenhaActionPerformed(evt);
            }
        });
        jTsenha.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTsenhaKeyReleased(evt);
            }
        });
        getContentPane().add(jTsenha);
        jTsenha.setBounds(210, 390, 212, 30);

        jB_ir.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jB_ir.setText("Ir");
        jB_ir.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jB_ir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jB_irActionPerformed(evt);
            }
        });
        getContentPane().add(jB_ir);
        jB_ir.setBounds(270, 460, 80, 40);

        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/logomarcav2.png"))); // NOI18N
        getContentPane().add(jLabel3);
        jLabel3.setBounds(10, 60, 140, 110);

        lb_imgLogin.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/LoginRed.jpg"))); // NOI18N
        getContentPane().add(lb_imgLogin);
        lb_imgLogin.setBounds(230, 210, 160, 140);

        lb_imgbackground.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        lb_imgbackground.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/ehEsta_1.jpg"))); // NOI18N
        lb_imgbackground.setText("jLabel3");
        lb_imgbackground.setMaximumSize(new java.awt.Dimension(600, 600));
        lb_imgbackground.setMinimumSize(new java.awt.Dimension(600, 600));
        getContentPane().add(lb_imgbackground);
        lb_imgbackground.setBounds(0, 0, 600, 600);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jTLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTLoginActionPerformed

    }//GEN-LAST:event_jTLoginActionPerformed

    private void jB_irActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_irActionPerformed

        this.setVisible(false);

        TelaGeral telaGeral = new TelaGeral();
        telaGeral.setVisible(true);

    }//GEN-LAST:event_jB_irActionPerformed

    private void jTsenhaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTsenhaActionPerformed

    }//GEN-LAST:event_jTsenhaActionPerformed

    private void jTLoginKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTLoginKeyReleased

        if (evt.getKeyCode() == 10) {
            jB_irActionPerformed(null);
        }

    }//GEN-LAST:event_jTLoginKeyReleased

    private void jTsenhaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTsenhaKeyReleased

        if (evt.getKeyCode() == 10) {
            jB_irActionPerformed(null);
        }

    }//GEN-LAST:event_jTsenhaKeyReleased

    private void jlblNovoMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jlblNovoMouseEntered

        jlblNovo.setFont(jlblNovo.getFont().deriveFont(1));

    }//GEN-LAST:event_jlblNovoMouseEntered

    private void jlblNovoMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jlblNovoMouseExited

        jlblNovo.setFont(jlblNovo.getFont().deriveFont(0));

    }//GEN-LAST:event_jlblNovoMouseExited

    private void jlblNovoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jlblNovoMouseClicked

        jB_irActionPerformed(null);

    }//GEN-LAST:event_jlblNovoMouseClicked

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(TelaLogin2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(TelaLogin2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(TelaLogin2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(TelaLogin2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                new TelaLogin2().setVisible(true);
            }
        });

    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jB_ir;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JTextField jTLogin;
    private javax.swing.JTextField jTsenha;
    private javax.swing.JLabel jlblNovo;
    private javax.swing.JLabel lb_imgLogin;
    private javax.swing.JLabel lb_imgbackground;
    // End of variables declaration//GEN-END:variables
}
